<ng-container [formGroup]="controlContainer.control">
  <div class="d-flex align-items-center justify-content-between">
    <m-switch-checkbox formControlName="all">选择本区内所有软件</m-switch-checkbox>
    <m-switch-checkbox formControlName="auth">配置软件使用权限</m-switch-checkbox>
  </div>
  <m-api-data-table
    [dataSource]="dataSource"
    [selection]="selection"
    [markSelected]="controlContainer.value.all"
  >
    <ng-container mDataTableColumn header="软件别名">
      <ng-template let-icon="icon" let-name="name">
        <td><img [src]="icon" class="g-icon-size" /> {{ name }}</td>
      </ng-template>
    </ng-container>
    <ng-container mDataTableColumn header="软件备注">
      <ng-template let-remark="remark">
        <td>{{ remark }}</td>
      </ng-template>
    </ng-container>
    <ng-container mDataTableColumn header="当前软件状态">
      <ng-template let-status="status">
        <td>
          <m-update-status-text [status]="status"></m-update-status-text>
        </td>
      </ng-template>
    </ng-container>
    <ng-container mDataTableColumn header="当前授权人员">
      <ng-template let-auth="user_auth">
        <td><m-auth-type [type]="auth"></m-auth-type></td>
      </ng-template>
    </ng-container>
    <ng-container mDataTableColumn header="版本号">
      <ng-template let-version="version">
        <td>{{ version }}</td>
      </ng-template>
    </ng-container>
    <ng-container mDataTableColumn header="软件更新时间">
      <ng-template let-upgrade_at="upgrade_at">
        <td>{{ upgrade_at | date }}</td>
      </ng-template>
    </ng-container>
  </m-api-data-table>
</ng-container>
